<?php 
App::uses('Article', 'Model');
class ArticleTest extends CakeTestCase{
	public $fixtures = array('app.article');


	public function setUp(){
		parent::setUp();
		$this->Article = ClassRegistry::init('Article');
	}

	public function testPublished(){
		$result = $this->Article->published(array('id', 'title'));	
		$expected = array(
			array('Article'=>array('id'=>1, 'title'=>'First Article')),
			array('Article'=>array('id'=>2, 'title'=>'Second Article')),
			array('Article'=>array('id'=>3, 'title'=>'Third Article')),
		);
		$this->assertEquals($expected, $result);
	}

}
?>
